```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>响应式编程与Spring WebFlux深度解析</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            color: #333;
            line-height: 1.8;
        }
        h1, h2, h3, h4 {
            font-family: 'Noto Serif SC', serif;
            font-weight: 600;
        }
        .hero-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        .code-block {
            background: #2d3748;
            color: #f8fafc;
            border-radius: 0.5rem;
            position: relative;
        }
        .code-block::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 2.5rem;
            background: rgba(255,255,255,0.1);
            border-top-left-radius: 0.5rem;
            border-top-right-radius: 0.5rem;
        }
        .code-lang {
            position: absolute;
            top: 0.5rem;
            left: 1rem;
            color: #a0aec0;
            font-size: 0.875rem;
        }
        .table-container {
            overflow-x: auto;
        }
        table {
            min-width: 100%;
            border-collapse: collapse;
        }
        th {
            background: #f3f4f6;
        }
        td, th {
            padding: 0.75rem;
            border: 1px solid #e5e7eb;
            text-align: left;
        }
        tr:nth-child(even) {
            background: #f9fafb;
        }
        .card-hover:hover {
            transform: translateY(-4px);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }
        .highlight {
            position: relative;
        }
        .highlight::before {
            content: "";
            position: absolute;
            left: -0.5rem;
            top: 0;
            bottom: 0;
            width: 0.25rem;
            background: #667eea;
            border-radius: 0.25rem;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <header class="hero-gradient text-white py-24 px-4 sm:px-6 lg:px-8">
        <div class="max-w-5xl mx-auto text-center">
            <div class="flex justify-center mb-6">
                <div class="bg-white bg-opacity-20 px-4 py-2 rounded-full text-sm font-medium inline-flex items-center">
                    <i class="fas fa-bolt mr-2"></i>
                    <span>高性能编程专题</span>
                </div>
            </div>
            <h1 class="text-4xl md:text-5xl font-bold leading-tight mb-6">响应式编程与Spring WebFlux深度解析</h1>
            <p class="text-xl md:text-2xl opacity-90 max-w-3xl mx-auto">
                解锁高并发场景下的非阻塞架构设计，构建每秒处理1000+请求的现代应用
            </p>
            <div class="mt-10">
                <div class="inline-flex rounded-md shadow">
                    <a href="#content" class="inline-flex items-center justify-center px-6 py-3 border border-transparent text-base font-medium rounded-md text-indigo-700 bg-white hover:bg-gray-50 transition duration-150">
                        <i class="fas fa-book-open mr-2"></i> 开始阅读
                    </a>
                </div>
            </div>
        </div>
    </header>

    <!-- Main Content -->
    <main class="max-w-5xl mx-auto px-4 sm:px-6 lg:px-8 py-16" id="content">
        <!-- Introduction Section -->
        <section class="mb-20">
            <div class="flex items-center mb-8">
                <div class="flex-shrink-0 h-12 w-12 rounded-full bg-indigo-100 flex items-center justify-center text-indigo-600">
                    <i class="fas fa-star text-xl"></i>
                </div>
                <h2 class="ml-4 text-3xl font-bold">高并发场景下的技术挑战与响应式编程的崛起</h2>
            </div>
            <div class="prose max-w-none text-gray-700 text-lg">
                <p class="highlight pl-6">
                    在电商秒杀、实时金融交易等场景中，传统同步阻塞的Spring MVC架构逐渐暴露出线程资源耗尽、响应延迟攀升等问题。Spring WebFlux作为Spring 5推出的响应式编程框架，通过非阻塞I/O和事件驱动模型，为高并发场景提供了全新的解决方案。
                </p>
                
                <!-- Concept Visualization -->
                <div class="mt-10">
                    <div class="mermaid">
                        graph LR
                            A[传统MVC] -->|线程阻塞| B(线程池耗尽)
                            A -->|同步处理| C(高延迟)
                            D[WebFlux] -->|非阻塞I/O| E(高吞吐量)
                            D -->|事件驱动| F(低延迟)
                    </div>
                </div>
            </div>
        </section>

        <!-- Core Concepts Section -->
        <section class="mb-20">
            <div class="flex items-center mb-8">
                <div class="flex-shrink-0 h-12 w-12 rounded-full bg-indigo-100 flex items-center justify-center text-indigo-600">
                    <i class="fas fa-cogs text-xl"></i>
                </div>
                <h2 class="ml-4 text-3xl font-bold">核心概念：非阻塞与响应式流的双螺旋架构</h2>
            </div>

            <div class="grid md:grid-cols-2 gap-8">
                <!-- Non-blocking I/O -->
                <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover transition duration-300">
                    <div class="p-6">
                        <h3 class="text-2xl font-bold mb-4 text-indigo-700">2.1 非阻塞I/O的底层原理</h3>
                        <div class="prose text-gray-700">
                            <p>WebFlux基于Netty等异步服务器实现，采用事件循环模型（Event Loop）替代传统线程池。每个请求由独立的事件循环线程处理，通过<code>Selector</code>监听多路复用通道，实现单线程处理多请求的并发模型。</p>
                            <p class="highlight pl-6">这种设计将线程切换开销从O(n)降至O(1)，显著提升资源利用率。</p>
                        </div>
                        <div class="mt-4">
                            <div class="mermaid">
                                sequenceDiagram
                                    participant C as Client
                                    participant E as Event Loop
                                    participant D as Database
                                    C->>E: 请求1
                                    C->>E: 请求2
                                    E->>D: 查询1
                                    E->>D: 查询2
                                    D-->>E: 结果1
                                    E-->>C: 响应1
                                    D-->>E: 结果2
                                    E-->>C: 响应2
                            </div>
                        </div>
                    </div>
                </div>

                <!-- Reactive Stream -->
                <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover transition duration-300">
                    <div class="p-6">
                        <h3 class="text-2xl font-bold mb-4 text-indigo-700">2.2 响应式流的数据处理范式</h3>
                        <div class="prose text-gray-700">
                            <ul class="space-y-3">
                                <li class="flex items-start">
                                    <span class="flex-shrink-0 h-6 w-6 rounded-full bg-indigo-100 text-indigo-700 flex items-center justify-center mr-3">
                                        <i class="fas fa-circle text-xs"></i>
                                    </span>
                                    <span><strong>Mono</strong>：表示0-1个元素的异步序列，适用于返回单个对象（如用户详情）。</span>
                                </li>
                                <li class="flex items-start">
                                    <span class="flex-shrink-0 h-6 w-6 rounded-full bg-indigo-100 text-indigo-700 flex items-center justify-center mr-3">
                                        <i class="fas fa-layer-group text-xs"></i>
                                    </span>
                                    <span><strong>Flux</strong>：表示0-N个元素的异步序列，适用于返回集合数据（如商品列表）。</span>
                                </li>
                                <li class="flex items-start">
                                    <span class="flex-shrink-0 h-6 w-6 rounded-full bg-indigo-100 text-indigo-700 flex items-center justify-center mr-3">
                                        <i class="fas fa-fire text-xs"></i>
                                    </span>
                                    <span><strong>冷流与热流</strong>：默认Flux/Mono为冷流（按需触发），可通过<code>.publishOn()</code>转换为热流（共享订阅）。</span>
                                </li>
                            </ul>
                        </div>
                        <div class="mt-6">
                            <div class="mermaid">
                                flowchart LR
                                    S[数据源] -->|发布| P(Publisher)
                                    P -->|订阅| SS(Subscriber)
                                    SS -->|请求N项| P
                                    P -->|推送至多N项| SS
                                    SS -->|取消订阅| P
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Setup Section -->
        <section class="mb-20">
            <div class="flex items-center mb-8">
                <div class="flex-shrink-0 h-12 w-12 rounded-full bg-indigo-100 flex items-center justify-center text-indigo-600">
                    <i class="fas fa-tools text-xl"></i>
                </div>
                <h2 class="ml-4 text-3xl font-bold">环境搭建：IDEA中的高效开发配置</h2>
            </div>

            <div class="grid md:grid-cols-2 gap-8">
                <!-- Project Initialization -->
                <div class="bg-white rounded-xl shadow-md overflow-hidden">
                    <div class="p-6">
                        <h3 class="text-2xl font-bold mb-4 text-indigo-700">3.1 项目初始化</h3>
                        <div class="prose text-gray-700 mb-6">
                            <p>通过Spring Initializr创建项目时，需添加以下依赖：</p>
                        </div>
                        <div class="code-block p-4">
                            <span class="code-lang">XML</span>
                            <pre class="overflow-x-auto"><code class="language-xml">&lt;dependency&gt;
    &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
    &lt;artifactId&gt;spring-boot-starter-webflux&lt;/artifactId&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
    &lt;groupId&gt;io.projectreactor&lt;/groupId&gt;
    &lt;artifactId&gt;reactor-test&lt;/artifactId&gt;
    &lt;scope&gt;test&lt;/scope&gt;
&lt;/dependency&gt;</code></pre>
                        </div>
                        <div class="prose text-gray-700 mt-6">
                            <p>建议使用JDK 17+和IDEA 2023.3+，开启<code>-Dreactor.netty.ioWorkerCount=4</code>参数优化Netty性能。</p>
                        </div>
                    </div>
                </div>

                <!-- Code Structure -->
                <div class="bg-white rounded-xl shadow-md overflow-hidden">
                    <div class="p-6">
                        <h3 class="text-2xl font-bold mb-4 text-indigo-700">3.2 代码结构设计</h3>
                        <div class="prose text-gray-700 mb-6">
                            <p>推荐采用<strong>分层架构</strong>：</p>
                        </div>
                        <div class="code-block p-4">
                            <span class="code-lang">目录结构</span>
                            <pre class="overflow-x-auto"><code class="language-plaintext">src
├── main
│   ├── java
│   │   └── com.example.webfluxdemo
│   │       ├── config  // WebFlux配置类
│   │       ├── controller  // 路由控制器
│   │       ├── service  // 响应式服务层
│   │       └── repository  // 非阻塞数据访问层
│   └── resources
│       └── application.yml
└── test
    └── java
        └── com.example.webfluxdemo
            └── WebFluxDemoApplicationTests.java</code></pre>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Case Study Section -->
        <section class="mb-20">
            <div class="flex items-center mb-8">
                <div class="flex-shrink-0 h-12 w-12 rounded-full bg-indigo-100 flex items-center justify-center text-indigo-600">
                    <i class="fas fa-laptop-code text-xl"></i>
                </div>
                <h2 class="ml-4 text-3xl font-bold">实战案例：电商高并发查询系统</h2>
            </div>

            <div class="space-y-12">
                <!-- Requirements -->
                <div>
                    <h3 class="text-2xl font-bold mb-6 text-indigo-700">4.1 需求分析</h3>
                    <div class="prose text-gray-700">
                        <p>系统需支持：</p>
                        <ul class="space-y-2">
                            <li class="flex items-start">
                                <span class="flex-shrink-0 h-6 w-6 rounded-full bg-indigo-100 text-indigo-700 flex items-center justify-center mr-3">
                                    <i class="fas fa-check text-xs"></i>
                                </span>
                                <span>每秒1000+并发查询请求</span>
                            </li>
                            <li class="flex items-start">
                                <span class="flex-shrink-0 h-6 w-6 rounded-full bg-indigo-100 text-indigo-700 flex items-center justify-center mr-3">
                                    <i class="fas fa-check text-xs"></i>
                                </span>
                                <span>实时返回商品库存与价格</span>
                            </li>
                            <li class="flex items-start">
                                <span class="flex-shrink-0 h-6 w-6 rounded-full bg-indigo-100 text-indigo-700 flex items-center justify-center mr-3">
                                    <i class="fas fa-check text-xs"></i>
                                </span>
                                <span>99.99%请求响应时间<50ms</span>
                            </li>
                        </ul>
                    </div>
                </div>

                <!-- Implementation -->
                <div>
                    <h3 class="text-2xl font-bold mb-6 text-indigo-700">4.2 技术实现</h3>
                    
                    <!-- Functional Routing -->
                    <div class="mb-8">
                        <h4 class="text-xl font-semibold mb-4 flex items-center">
                            <span class="inline-block w-6 h-6 bg-indigo-100 text-indigo-700 rounded-full flex items-center justify-center mr-2">
                                <i class="fas fa-code text-sm"></i>
                            </span>
                            4.2.1 函数式路由设计
                        </h4>
                        <div class="code-block p-4 mb-4">
                            <span class="code-lang">Java</span>
                            <pre class="overflow-x-auto"><code class="language-java">@Configuration
public class WebFluxConfig implements WebFluxConfigurer {
    @Bean
    public RouterFunction&lt;ServerResponse&gt; routes(UserHandler handler) {
        return RouterFunctions.route()
            .GET("/products/{id}", handler::getProduct)
            .GET("/products", handler::getProducts)
            .build();
    }
}</code></pre>
                        </div>
                    </div>
                    
                    <!-- Reactive Service -->
                    <div class="mb-8">
                        <h4 class="text-xl font-semibold mb-4 flex items-center">
                            <span class="inline-block w-6 h-6 bg-indigo-100 text-indigo-700 rounded-full flex items-center justify-center mr-2">
                                <i class="fas fa-server text-sm"></i>
                            </span>
                            4.2.2 响应式服务层
                        </h4>
                        <div class="code-block p-4 mb-4">
                            <span class="code-lang">Java</span>
                            <pre class="overflow-x-auto"><code class="language-java">@Service
public class ProductService {
    private final ReactiveMongoTemplate mongoTemplate;

    public Flux&lt;Product&gt; getProducts() {
        return mongoTemplate.findAll(Product.class)
            .publishOn(Schedulers.parallel()); // 异步执行数据库查询
    }

    public Mono&lt;Product&gt; getProduct(String id) {
        return mongoTemplate.findById(id, Product.class)
            .switchIfEmpty(Mono.error(new ResponseStatusException(HttpStatus.NOT_FOUND)));
    }
}</code></pre>
                        </div>
                    </div>
                    
                    <!-- Optimization -->
                    <div>
                        <h4 class="text-xl font-semibold mb-4 flex items-center">
                            <span class="inline-block w-6 h-6 bg-indigo-100 text-indigo-700 rounded-full flex items-center justify-center mr-2">
                                <i class="fas fa-tachometer-alt text-sm"></i>
                            </span>
                            4.2.3 性能优化
                        </h4>
                        <div class="grid md:grid-cols-3 gap-4">
                            <div class="bg-indigo-50 p-4 rounded-lg">
                                <div class="flex items-center mb-2">
                                    <div class="w-8 h-8 bg-indigo-100 rounded-full flex items-center justify-center text-indigo-700 mr-3">
                                        <i class="fas fa-database"></i>
                                    </div>
                                    <h5 class="font-bold">数据库层</h5>
                                </div>
                                <p class="text-sm">使用R2DBC替代JDBC，实现非阻塞数据库访问</p>
                            </div>
                            <div class="bg-indigo-50 p-4 rounded-lg">
                                <div class="flex items-center mb-2">
                                    <div class="w-8 h-8 bg-indigo-100 rounded-full flex items-center justify-center text-indigo-700 mr-3">
                                        <i class="fas fa-memory"></i>
                                    </div>
                                    <h5 class="font-bold">缓存层</h5>
                                </div>
                                <p class="text-sm">集成Redisson实现响应式缓存，热点数据直接从内存读取</p>
                            </div>
                            <div class="bg-indigo-50 p-4 rounded-lg">
                                <div class="flex items-center mb-2">
                                    <div class="w-8 h-8 bg-indigo-100 rounded-full flex items-center justify-center text-indigo-700 mr-3">
                                        <i class="fas fa-signal"></i>
                                    </div>
                                    <h5 class="font-bold">限流降级</h5>
                                </div>
                                <p class="text-sm">通过Resilience4j设置QPS阈值，超限自动返回缓存数据</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Optimization Section -->
        <section class="mb-20">
            <div class="flex items-center mb-8">
                <div class="flex-shrink-0 h-12 w-12 rounded-full bg-indigo-100 flex items-center justify-center text-indigo-600">
                    <i class="fas fa-rocket text-xl"></i>
                </div>
                <h2 class="ml-4 text-3xl font-bold">性能优化：从代码到架构的全链路调优</h2>
            </div>

            <div class="grid md:grid-cols-2 gap-8">
                <!-- Golden Rules -->
                <div class="bg-white rounded-xl shadow-md overflow-hidden">
                    <div class="p-6">
                        <h3 class="text-2xl font-bold mb-4 text-indigo-700">5.1 避免阻塞操作的黄金法则</h3>
                        <div class="prose text-gray-700">
                            <ul class="space-y-3">
                                <li class="flex items-start">
                                    <span class="flex-shrink-0 h-6 w-6 rounded-full bg-red-100 text-red-700 flex items-center justify-center mr-3">
                                        <i class="fas fa-ban text-xs"></i>
                                    </span>
                                    <span>禁用<code>Thread.sleep()</code>，改用<code>Mono.delay()</code></span>
                                </li>
                                <li class="flex items-start">
                                    <span class="flex-shrink-0 h-6 w-6 rounded-full bg-red-100 text-red-700 flex items-center justify-center mr-3">
                                        <i class="fas fa-ban text-xs"></i>
                                    </span>
                                    <span>避免同步文件IO，使用<code>FileSystemResource</code>配合<code>Flux&lt;DataBuffer&gt;</code></span>
                                </li>
                                <li class="flex items-start">
                                    <span class="flex-shrink-0 h-6 w-6 rounded-full bg-green-100 text-green-700 flex items-center justify-center mr-3">
                                        <i class="fas fa-check-circle text-xs"></i>
                                    </span>
                                    <span>第三方服务调用优先选择WebClient（配置连接池）</span>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>

                <!-- Monitoring -->
                <div class="bg-white rounded-xl shadow-md overflow-hidden">
                    <div class="p-6">
                        <h3 class="text-2xl font-bold mb-4 text-indigo-700">5.2 监控与调优</h3>
                        <div class="grid grid-cols-2 gap-4">
                            <div class="bg-gray-50 p-4 rounded-lg">
                                <div class="flex items-center mb-2">
                                    <div class="w-8 h-8 bg-indigo-100 rounded-full flex items-center justify-center text-indigo-700 mr-3">
                                        <i class="fas fa-chart-line"></i>
                                    </div>
                                    <h5 class="font-bold">Micrometer集成</h5>
                                </div>
                                <p class="text-sm">暴露Prometheus端点监控吞吐量、线程池状态</p>
                            </div>
                            <div class="bg-gray-50 p-4 rounded-lg">
                                <div class="flex items-center mb-2">
                                    <div class="w-8 h-8 bg-indigo-100 rounded-full flex items-center justify-center text-indigo-700 mr-3">
                                        <i class="fas fa-search"></i>
                                    </div>
                                    <h5 class="font-bold">VisualVM分析</h5>
                                </div>
                                <p class="text-sm">通过线程Dump定位阻塞点</p>
                            </div>
                            <div class="bg-gray-50 p-4 rounded-lg">
                                <div class="flex items-center mb-2">
                                    <div class="w-8 h-8 bg-indigo-100 rounded-full flex items-center justify-center text-indigo-700 mr-3">
                                        <i class="fas fa-hammer"></i>
                                    </div>
                                    <h5 class="font-bold">JMeter压测</h5>
                                </div>
                                <p class="text-sm">模拟高并发场景，优化线程模型参数</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- FAQ Section -->
        <section>
            <div class="flex items-center mb-8">
                <div class="flex-shrink-0 h-12 w-12 rounded-full bg-indigo-100 flex items-center justify-center text-indigo-600">
                    <i class="fas fa-question-circle text-xl"></i>
                </div>
                <h2 class="ml-4 text-3xl font-bold">常见问题与解决方案</h2>
            </div>

            <div class="grid md:grid-cols-2 gap-8">
                <!-- Error Types -->
                <div class="bg-white rounded-xl shadow-md overflow-hidden">
                    <div class="p-6">
                        <h3 class="text-2xl font-bold mb-4 text-indigo-700">6.1 常见错误类型</h3>
                        <div class="table-container">
                            <table>
                                <thead>
                                    <tr>
                                        <th>错误现象</th>
                                        <th>原因分析</th>
                                        <th>解决方案</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td>接口响应时间突增</td>
                                        <td>数据库查询阻塞</td>
                                        <td>切换R2DBC+索引优化</td>
                                    </tr>
                                    <tr>
                                        <td>控制台内存溢出日志</td>
                                        <td>未正确处理背压（Backpressure）</td>
                                        <td>使用<code>onBackpressureBuffer()</code>操作符</td>
                                    </tr>
                                    <tr>
                                        <td>测试时出现<code>MissingBean</code></td>
                                        <td>缺少Reactor依赖</td>
                                        <td>添加<code>spring-boot-starter-webflux</code></td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>

                <!-- Debugging Tips -->
                <div class="bg-white rounded-xl shadow-md overflow-hidden">
                    <div class="p-6">
                        <h3 class="text-2xl font-bold mb-4 text-indigo-700">6.2 调试技巧</h3>
                        <div class="prose text-gray-700">
                            <ul class="space-y-3">
                                <li class="flex items-start">
                                    <span class="flex-shrink-0 h-6 w-6 rounded-full bg-indigo-100 text-indigo-700 flex items-center justify-center mr-3">
                                        <i class="fas fa-terminal text-xs"></i>
                                    </span>
                                    <span>使用<code>log()</code>操作符记录流处理过程</span>
                                </li>
                                <li class="flex items-start">
                                    <span class="flex-shrink-0 h-6 w-6 rounded-full bg-indigo-100 text-indigo-700 flex items-center justify-center mr-3">
                                        <i class="fas fa-vial text-xs"></i>
                                    </span>
                                    <span>通过<code>StepVerifier</code>单元测试响应式链</span>
                                </li>
                                <li class="flex items-start">
                                    <span class="flex-shrink-0 h-6 w-6 rounded-full bg-indigo-100 text-indigo-700 flex items-center justify-center mr-3">
                                        <i class="fas fa-bug text-xs"></i>
                                    </span>
                                    <span>启用<code>-Dreactor.debug.enabled=true</code>获取详细调试信息</span>
                                </li>
                            </ul>
                        </div>
                        <div class="mt-6 bg-yellow-50 border-l-4 border-yellow-400 p-4">
                            <div class="flex">
                                <div class="flex-shrink-0">
                                    <i class="fas fa-lightbulb text-yellow-500"></i>
                                </div>
                                <div class="ml-3">
                                    <p class="text-sm text-yellow-700">
                                        <strong>专业提示：</strong> 使用<code>Hooks.onOperatorDebug()</code>可以获取更详细的调用栈信息，但会影响性能，仅限开发环境使用。
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </main>

    <!-- Footer -->
    <footer class="bg-gray-900 text-gray-300 py-12 px-4 sm:px-6 lg:px-8">
        <div class="max-w-5xl mx-auto">
            <div class="flex flex-col items-center">
                <div class="text-xl font-semibold text-white mb-2">技术小馆</div>
                <a href="http://www.yuque.com/jtostring" class="text-indigo-400 hover:text-indigo-300 transition duration-150">http://www.yuque.com/jtostring</a>
                <div class="mt-6 flex space-x-6">
                    <a href="#" class="text-gray-400 hover:text-white transition duration-150">
                        <i class="fab fa-github text-xl"></i>
                    </a>
                    <a href="#" class="text-gray-400 hover:text-white transition duration-150">
                        <i class="fab fa-twitter text-xl"></i>
                    </a>
                    <a href="#" class="text-gray-400 hover:text-white transition duration-150">
                        <i class="fab fa-linkedin text-xl"></i>
                    </a>
                </div>
            </div>
        </div>
    </footer>

    <script>
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: true,
                htmlLabels: true,
                curve: 'basis'
            },
            sequenceDiagram: {
                width: 500,
                height: 200,
                boxMargin: 10
            }
        });
    </script>
</body>
</html>
```